var should = require('should');
var assert = require('assert');
var surviveService = require('../../app/services/surviveService');
var config = require('../config');

suite('surviveService', function () {
    suite('getRewardList', function () {
        test('获取奖励列表', function () {
            surviveService.getRewardList(1, 1).length.should.equal(0);
            surviveService.getRewardList(1, 10).length.should.equal(2);
        });
    });

    suite('getSweepRewardList', function () {
        test('获取扫荡奖励列表', function () {
            var reward_list = surviveService.getSweepRewardList(1, 100);
            reward_list.length.should.equal(20);
        });
    });

    suite('rank', function () {
        test('获取排行版', function (done) {
            surviveService.rank(function (err, role_list) {
                done();
            });
        });
    });

    suite('currentRoleRank', function () {
        test('当前玩家排行版', function (done) {
            surviveService.currentRoleRank(config.other_role_id, function (err, role_item) {
                done();
            });
        });
    });
});
